{extend name="default/template/base_index" /}


{block name="area_header"}
    <link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
    <script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
{/block}

{block name="area_body"}
    {include file="default/Widget/topbar" /}
    <div class="admin-main container-fluid">
        {include file="default/Widget/left" /}
        <div class="admin-main-content">
            {include file="default/Widget/breadcrumb" /}
            <div class="table-responsive well">
                <div class="h4">
                </div>
                <div class="form-control-static">
                    <form action="{:url('ApiCallHis/index')}" method="post" class="form-inline">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <input type="text" name="startdatetime" id="startdatetime" class="form-control" value="{:date('Y/m/d H:i',$startdatetime)}" />
                                <div class="input-group-addon">
                                    <i class="fa fa-long-arrow-right"></i>
                                </div>
                                <input type="text" name="enddatetime" id="enddatetime" class="form-control" value="{:date('Y/m/d H:i',$enddatetime)}" />
                            </div>
                        </div>
                        <button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
                    </form>
                </div>
                <div class="form-control-static">
                    <a href="{:url('ApiCallHis/clearall')}" class="confirm ajax-get btn btn-danger btn-sm" >清空全部</a>
                </div>
                <table class="table table-striped table table-hover  table-condensed">
                    <thead>
                    <tr>
                        <th>
                            <input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />{:L('SELECT_ALL')}
                        <th>
                            {:L('VIEW_DATETIME')}
                        </th>
                        <th>get接口
                        </th>
                        <th style="width:500px;">post接口
                        </th>
                        <th>请求参数
                        </th>
                        <th>
                            {:L('VIEW_INFO')}
                        </th>
                        <th>
                            {:L('OPERATOR')}
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    {empty name="list"}
                        <tr>
                            <td colspan="7" class="text-center">{:L('NO_DATA')}</td>
                        </tr>
                    {/empty}
                    {volist name="list" id="vo"}
                        <tr>
                            <td>
                                <input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" />{$vo.id}</td>
                            <td>{$vo.call_time|date="Y/m/d H:i:s",###}</td>
                            <td>{$vo.call_get_args}</td>
                            <td >{$vo.call_post_args}</td>
                            <td>{$vo.api_uri}</td>
                            <td>{$vo.notes}</td>
                            <td>

                                <a href="{:url(CONTROLLER_NAME .'/delete',array('id'=>$vo['id']))}" class="btn btn-danger btn-sm ajax-get confirm"><i class="fa fa-trash-o"></i> {:L('BTN_DELETE')}</a>
                            </td>
                        </tr>

                    {/volist}
                    </tbody>
                </table>
                <div>
                    {$show}
                </div>
            </div>

        </div>
    </div>
{/block}

{block name="area_footer"}
    <script type="text/javascript">
        $(function() {
            $('#startdatetime').datetimepicker({
                lang: 'ch'
            });
            $('#enddatetime').datetimepicker({
                lang: 'ch'
            });
        })
    </script>
{/block}